//调用角色列表接口
import { getRoleList } from "../../../request/api";
const state = {
  rolelist: [],
};
const getters = {
  getRole(state) {
    return state.rolelist;
  },
};
const mutations = {
    REQ_ROLELIST(state,payload){
        state.rolelist = payload
    }
};
const actions = {
  getRoleAction({ commit }) {
    getRoleList()
    .then(res=>{
        // console.log(res,'列表')
        commit('REQ_ROLELIST',res.list)
    })
  },
};

export default {
  state,
  getters,
  mutations,
  actions,
  namespaced: true,
};
